package org.demo.system.service.impl;

import org.demo.base.auth.domain.Permission;
import org.demo.system.mapper.PermissionMapper;
import org.demo.system.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.List;

/**
 * @author tomdog
 */
@Service
public class PermissionServiceImpl implements PermissionService {

    @Autowired
    private PermissionMapper permissionMapper;

    /**
     * 根据roleKeys查询所有的权限
     * @param roleKeys
     * @return
     */
    @Override
    public List<Permission> listByRoleKeys(Collection<String> roleKeys) {
        return permissionMapper.listByRoleKeys(roleKeys);
    }
}
